package com.houtai.common.util;

import java.util.List;
import java.util.stream.Stream;

public class WordsUtil {

    /**
     * 判断一段文章中是否存在铭感词
     * zjj
     *
     * @param countent
     * @return
     */
    public static boolean isExit(String countent) {
        List<String> words = SensitiveWord.getWords();
        Stream<String> stream = words.stream();
        final String[] word = new String[1];
        stream.forEach(s -> {
            if (countent.contains(s)){
                word[0] = s;
            }
        });
        if (word[0] != null) {
            return false;
        } else {
            return true;
        }

    }

}
